package com.ffpc.sql;

import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;

import org.apache.commons.configuration.Configuration;

/**
 * 
 * @author KENNETHLCH
 * @version $Id: ConnectionProvider.java,v 1.1.1.1 2013/08/16 05:35:48 tengyang Exp $
 */
public interface ConnectionProvider {
    
    void init(Configuration config) throws SQLException, DataException;
    
    void destroy();

    void diagnose(PrintWriter out);

    Connection getConnection(ConnectionFactory factory) throws SQLException;

    String getName();

}